package cn.gson.springboot.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the drugstorage_check database table.
 * 
 */
@Entity
@Table(name="drugstorage_check")
@NamedQuery(name="DrugstorageCheck.findAll", query="SELECT d FROM DrugstorageCheck d")
public class DrugstorageCheck implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="drugchek_id")
	private int drugchekId;

	@Column(name="drugcheck_differencemoney")
	private BigDecimal drugcheckDifferencemoney;

	@Column(name="drugchek_allmoney")
	private BigDecimal drugchekAllmoney;

	@Column(name="drugchek_allnumber")
	private int drugchekAllnumber;
	
	@Column(name="drugchek_state")
	private int drugchekState;
	
	@Column(name="drugcheck_state")
	private int drugcheckState;


	@Column(name="drugchek_category")
	private String drugchekCategory;

	@Column(name="drugchek_people")
	private String drugchekPeople;

	@Column(name="drugchek_time")
	private Timestamp drugchekTime;
	
	@Column(name="drugcheck_twopeople")
	private String drugcheckTwopeople;
	
	@Column(name="drugcheck_endtime")
	private Timestamp drugcheckEndtime;

	@Lob
	@Column(name="drugchek_zhaiyao")
	private String drugchekZhaiyao;

	//bi-directional many-to-one association to DrugstoragecheckDetail
	@OneToMany(mappedBy="drugstorageCheck")
	private List<DrugstoragecheckDetail> drugstoragecheckDetails;

	public DrugstorageCheck() {
	}

	public int getDrugchekId() {
		return this.drugchekId;
	}

	public int getDrugchekState() {
		return drugchekState;
	}

	public void setDrugchekState(int drugchekState) {
		this.drugchekState = drugchekState;
	}

	public String getDrugcheckTwopeople() {
		return drugcheckTwopeople;
	}

	public void setDrugcheckTwopeople(String drugcheckTwopeople) {
		this.drugcheckTwopeople = drugcheckTwopeople;
	}

	public Timestamp getDrugcheckEndtime() {
		return drugcheckEndtime;
	}

	public void setDrugcheckEndtime(Timestamp drugcheckEndtime) {
		this.drugcheckEndtime = drugcheckEndtime;
	}

	public void setDrugchekId(int drugchekId) {
		this.drugchekId = drugchekId;
	}

	public BigDecimal getDrugcheckDifferencemoney() {
		return this.drugcheckDifferencemoney;
	}

	public void setDrugcheckDifferencemoney(BigDecimal drugcheckDifferencemoney) {
		this.drugcheckDifferencemoney = drugcheckDifferencemoney;
	}

	public BigDecimal getDrugchekAllmoney() {
		return this.drugchekAllmoney;
	}

	public int getDrugcheckState() {
		return drugcheckState;
	}

	public void setDrugcheckState(int drugcheckState) {
		this.drugcheckState = drugcheckState;
	}

	public void setDrugchekAllmoney(BigDecimal drugchekAllmoney) {
		this.drugchekAllmoney = drugchekAllmoney;
	}

	public int getDrugchekAllnumber() {
		return this.drugchekAllnumber;
	}

	public void setDrugchekAllnumber(int drugchekAllnumber) {
		this.drugchekAllnumber = drugchekAllnumber;
	}

	public String getDrugchekCategory() {
		return this.drugchekCategory;
	}

	public void setDrugchekCategory(String drugchekCategory) {
		this.drugchekCategory = drugchekCategory;
	}

	public String getDrugchekPeople() {
		return this.drugchekPeople;
	}

	public void setDrugchekPeople(String drugchekPeople) {
		this.drugchekPeople = drugchekPeople;
	}

	public Timestamp getDrugchekTime() {
		return this.drugchekTime;
	}

	public void setDrugchekTime(Timestamp drugchekTime) {
		this.drugchekTime = drugchekTime;
	}

	public String getDrugchekZhaiyao() {
		return this.drugchekZhaiyao;
	}

	public void setDrugchekZhaiyao(String drugchekZhaiyao) {
		this.drugchekZhaiyao = drugchekZhaiyao;
	}

	public List<DrugstoragecheckDetail> getDrugstoragecheckDetails() {
		return this.drugstoragecheckDetails;
	}

	public void setDrugstoragecheckDetails(List<DrugstoragecheckDetail> drugstoragecheckDetails) {
		this.drugstoragecheckDetails = drugstoragecheckDetails;
	}

	public DrugstoragecheckDetail addDrugstoragecheckDetail(DrugstoragecheckDetail drugstoragecheckDetail) {
		getDrugstoragecheckDetails().add(drugstoragecheckDetail);
		drugstoragecheckDetail.setDrugstorageCheck(this);

		return drugstoragecheckDetail;
	}

	public DrugstoragecheckDetail removeDrugstoragecheckDetail(DrugstoragecheckDetail drugstoragecheckDetail) {
		getDrugstoragecheckDetails().remove(drugstoragecheckDetail);
		drugstoragecheckDetail.setDrugstorageCheck(null);

		return drugstoragecheckDetail;
	}

}